<template>
  <div>
      <button @click="$emit('update:num',num-1)">子组件点击{{num}}</button>
      <slot name="header" :user="user"></slot>
  </div>
</template>
<script>
  export default {
    props: {
      num: {
        type: Number
      },
      checked: {
        type: Boolean
      },
      name: {
        type: String
      }
    },
    computed: {

    },
    data() {
      return {
        user: {name:'mausen'}
      }
    },
    methods: {
      abc(e) {
        console.log(e.target.value);
        this.$emit('update:name', e.target.value);
      }
    }
  }
</script>